<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <StringResourcesPath>$(MSBuildProjectDirectory)\..\src\Resources\Strings.resx</StringResourcesPath>
    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>
    <IgnoreForCI Condition="'$(TargetOS)' == 'browser'">true</IgnoreForCI>
  </PropertyGroup>
  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <DefineConstants Condition="'$(TargetPlatformIdentifier)' == 'windows'">$(DefineConstants);TargetsWindows</DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="$(CommonPath)System\IO\StringParser.cs"
             Link="Common\System\IO\StringParser.cs" />
    <Compile Include="$(CommonTestPath)System\ShouldNotBeInvokedException.cs"
             Link="Common\System\ShouldNotBeInvokedException.cs" />
    <Compile Include="$(CommonTestPath)Microsoft\Win32\TempRegistryKey.cs"
             Link="Common\Microsoft\Win32\TempRegistryKey.cs" />
    <Compile Include="$(CommonPath)System\Text\ValueStringBuilder.cs"
             Link="Common\System\Text\ValueStringBuilder.cs" />
    <Compile Include="$(CommonTestPath)System\IO\PathFeatures.cs"
             Link="Common\System\IO\PathFeatures.cs" />
    <Compile Include="DelegateSynchronizeInvoke.cs" />
    <Compile Include="FileAssociations.cs" />
    <Compile Include="Helpers.cs" />
    <Compile Include="Interop.cs" />
    <Compile Include="ProcessCollectionTests.cs" />
    <Compile Include="ProcessModuleTests.cs" />
    <Compile Include="ProcessStandardConsoleTests.cs" />
    <Compile Include="ProcessStartInfoTests.cs" />
    <Compile Include="ProcessStreamReadTests.cs" />
    <Compile Include="ProcessTestBase.cs" />
    <Compile Include="ProcessTestBase.NonUap.cs" />
    <Compile Include="ProcessTests.cs" />
    <Compile Include="ProcessThreadTests.cs" />
    <Compile Include="ProcessWaitingTests.cs" />
    <Compile Include="RemotelyInvokable.cs" />
    <Compile Include="AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="ProcessModuleTests.Windows.cs" />
    <Compile Include="ProcessStartInfoTests.Windows.cs" />
    <Compile Include="ProcessTests.Windows.cs" />
    <Compile Include="ProcessThreadTests.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
         Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.LoadLibrary.cs"
         Link="Common\Interop\Windows\Kernel32\Interop.LoadLibrary.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.FreeLibrary.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.FreeLibrary.cs" />
    <!-- Helpers -->
    <Compile Include="$(CommonTestPath)TestUtilities\System\WindowsTestFileShare.cs" Link="Common\TestUtilities\System\WindowsTestFileShare.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix' or '$(TargetPlatformIdentifier)' == 'browser'">
    <Compile Include="Interop.Unix.cs" />
    <Compile Include="ProcessTests.Unix.cs" />
    <Compile Include="ProcessThreadTests.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.Libraries.cs"
             Link="Common\Interop\OSX\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.libproc.cs"
             Link="Common\Interop\OSX\Interop.libproc.cs" />
    <Compile Include="$(CommonPath)Interop\OSX\Interop.libSystem.cs"
             Link="Common\Interop\OSX\Interop.libSystem.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry\src\Microsoft.Win32.Registry.csproj" />
    <ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices\src\System.DirectoryServices.csproj" />
    <ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
    <ProjectReference Include="LongPath\LongPath.csproj" Condition="'$(TargetPlatformIdentifier)' == 'windows'">
      <OutputItemType>Content</OutputItemType>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </ProjectReference>
    <!-- R2R testing does not tolerate the combination of a regular project reference and a content reference. -->
    <!-- This is a bug in the SDK tracked here: https://github.com/dotnet/sdk/issues/30718 -->
    <PublishReadyToRunExclude Include="LongPath.dll" />
  </ItemGroup>
</Project>
